<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卖家-修改个人信息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>

<script type="text/javascript" src="<?php echo $this->_webroot('servtools/jquery-1.3.2.min.js?v=1.3.2'); ?>"></script>
<script type="text/javascript" src="<?php echo $this->_webroot('servtools/xheditor/xheditor.min.js?v=1.0.0-final'); ?>"></script>
<script type="text/javascript">
var introeditor;
$(function(){
	introeditor=$("#content").xheditor({skin:'vista',tools:"Cut,Copy,Paste,Pastetext,Separator,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,Separator,Align,List,Outdent,Indent,Separator,Link,Unlink,Img,Table,Separator,Source,Fullscreen,About"});

});
</script>

</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
    </div>
<link href="<?php echo $this->_webroot('/user/css/shoprequest.css'); ?>" rel="stylesheet" type="text/css" />   
    <div class="main-right main_right">
	

            <div class="cont">
                <div class="cont_title">添加文章<span class="tr_op"><a href="<?php echo $this->_url('shoparticle/index');?>">文章列表</a></span></div>
<style>

</style>            
		<form action="<?php echo $this->_url('shoparticle/add');?>" method="post" onsubmit="return checkForm();">
		<table class="form-table">
			<tr>
				<td width="75px">选择分类：</td>
				<td><select name="data[cat_id]">
					<option value="0">选择分类</option>
					<?php foreach($catlist as $value) {?>
					<option value="<?php echo $value['shoparticlecat']['id']; ?>"  ><?php echo $value['shoparticlecat']['cat_name']; ?></option>
					<?php }?>
				</select> <span id="position_id_message">*</span></td>
			</tr>
			<tr>
				<td>新闻标题：</td>
				<td><input class="small-text" type="text" name="data[title]" value="<?php echo $news_info['title']; ?>" style="width:200px;" maxlength="50"  /> <span id="asd_name_message">*</span></td>
			</tr>
			<tr>
				<td>简介：</td>
				<td>
				<textarea name="data[description]"  cols="50" rows="3"  maxlength="100" ></textarea>
				<span id="asd_name_message">*</span>
				</td>
			</tr>
			
			<tr>
				<td>标题颜色：</td>
				<td>
					<input type="text" style="background:#" name="data[tag_color]" value="" onclick="coloropen(event)" id="inputcolor" />
					<div id="colorpane" style="position:absolute;z-index:999;display:none;"></div>
				</td>
			</tr>
			<tr>
				<td>是否粗体：</td>
				<td>
					<input type="checkbox"  name="data[is_blod]" value="1" >
				</td>
			</tr>
			<tr>
				<td>标题排序：</td>
				<td><input type="text" class="small-text" name="data[short_order]" value=""  maxlength="4" /></td>
			</tr>

			<tr>
				<td valign="top">新闻内容：</td>
				<td style="line-height:18px;"><textarea name="data[content]" id="content" cols="90" rows="15"><?php echo $news_info['content'];?></textarea>
				<iframe name="KindImageIframe" id="KindImageIframe" width="90%" height='30' align="top" allowTransparency="true" scrolling="no" src='<?php echo $this->_url('shoparticle/uploadform');?>' frameborder=0></iframe></td>
			</tr>
			<tr>
				<td>外部链接：</td>
				<td>使用外链<input type="checkbox" name="data[is_link]" value="1" <?php if($news_info['is_link']){ echo "checked"; }?> /></td>
			</tr>
			<tr>
				<td>链接地址：</td>
				<td><input type="text" name="data[link_url]" value="<?php echo $news_info['link_url'];?>" style="width:250px;" maxlength="200" /></td>
			</tr>
			<tr>
				<td>是否显示：</td>
				<td><input type="checkbox" name="data[is_show]" value="1" <?php if($news_info['is_show']){ echo "checked"; }?> /></td>
			</tr>
			<tr><td colspan="2"><span class="button-container"><input class="regular-button" type="submit" name="submit" value="添加新闻" /></span></td></tr>
		</table>
		</form>		  
			  
			  
			  
			  
            </div>
	
	

        

    </div>
    <div class="clear"></div>
</div>

<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>

<script language="JavaScript">
<!--
var ColorHex=new Array('00','33','66','99','CC','FF')
var SpColorHex=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF')
var current=null
function initcolor(evt)
{
var colorTable=''
for (i=0;i<2;i++)
{
for (j=0;j<6;j++)
{
colorTable=colorTable+'<tr height=15>'
colorTable=colorTable+'<td width=10 style="background-color:#000000">'
if (i==0){
colorTable=colorTable+'<td width=10 style="cursor:pointer;background-color:#'+ColorHex[j]+ColorHex[j]+ColorHex[j]+'" onclick="doclick(this.style.backgroundColor)">'}
else{
colorTable=colorTable+'<td width=10 style="cursor:pointer;background-color:#'+SpColorHex[j]+'" onclick="doclick(this.style.backgroundColor)">'}
colorTable=colorTable+'<td width=10 style="background-color:#000000">'
for (k=0;k<3;k++)
{
for (l=0;l<6;l++)
{
colorTable=colorTable+'<td width=10 style="cursor:pointer;background-color:#'+ColorHex[k+i*3]+ColorHex[l]+ColorHex[j]+'" onclick="doclick(this.style.backgroundColor)">'
}
}
}
}
colorTable='<table border="0" cellspacing="0" cellpadding="0" style="border:1px #000000 solid;border-bottom:none;border-collapse: collapse;width:200px;" bordercolor="000000">'
+'<tr height=20><td colspan=21 bgcolor=#ffffff style="font:12px tahoma;padding-left:2px;">'
+'<span style="float:left;color:#999999;">点击颜色选取</span>'
+'<span style="float:right;padding-right:3px;cursor:pointer;" onclick="colorclose()">×关闭</span>'
+'</td></table>'
+'<table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="000000" style="cursor:pointer;">'
+colorTable+'</table>';
document.getElementById("colorpane").innerHTML=colorTable;
var current_x = document.getElementById("inputcolor").offsetLeft;
var current_y = document.getElementById("inputcolor").offsetTop;
//alert(current_x + "-" + current_y)
document.getElementById("colorpane").style.left = current_x + "px";
document.getElementById("colorpane").style.top = current_y + "px";
}
function doclick(obj){
	document.getElementById('inputcolor').value=obj;
	document.getElementById('inputcolor').style.background=obj;
	colorclose();
}
function colorclose(){
document.getElementById("colorpane").style.display = "none";
}
function coloropen(){
document.getElementById("colorpane").style.display = "";
}
window.onload = initcolor;

function checkForm() {
	var title = document.getElementsByName("title")[0];
	var site_url = document.getElementsByName('link_url')[0];
	var checkfiles=new RegExp("((^http)|(^https)|(^ftp)):\/\/(\\w)+\.(\\w)+");
	if(site_url.value!='') {
		if(!checkfiles.test(site_url.value)) {
			ShowMessageBox("网站格式不正确！",'0');
			return false;
		}
	}
	if(title.value=='') {
		ShowMessageBox("标题不能为空！",'0');
		title.focus();
		return false;
	} else if(document.getElementsByName("cat_id")[0].value==0) {
		ShowMessageBox("请选择分类！",'0');
		return false;
	}
	return true;
}
function AddContentImg(ImgName,classId){
	introeditor.appendHTML("<img src="+ImgName+"/><br>");
}

//-->
</script>

</body>
</html>